package com.haojiang.mh.ui.base

import android.view.View
import android.widget.ScrollView
import com.haojiang.mh.cache.Const
import com.haojiang.mh.service.entity.DayReportBean
import com.haojiang.mh.service.event.OneEvent
import com.haojiang.mh.widget.scroll.ScrollableHelper
import org.greenrobot.eventbus.EventBus

/**
 * 可滑动Fragment基类
 *
 * Created by ZapFive on 2019-06-01.
 *
 * wuzhuang@mirahome.me
 */
abstract class BaseScrollAbleFragment : LazyLoadBaseFragment(), ScrollableHelper.ScrollableContainer {

    override fun getScrollableView(): View {
        return rootView as ScrollView
    }

    protected fun hideLoadingDialog() {
        context.hideLoadingDialog()
        EventBus.getDefault().post(OneEvent(Const.REFRESH_DATA))
    }
}
